using System.Drawing;
using TouchSmart.Animations;
using TouchSmart.Gestures;

namespace TouchSmart.Widgets
{
    public class DynamicBox : Box
    {
        private LinearAnimation _animation;

        public DynamicBox() : this(new Point(0, 0), new Size(0, 0), Color.Black) { }

        public DynamicBox(Point location, Size size, Color color) : base(location, size, color)
        {
            this._animation = new LinearAnimation(0.0f, 1.0f);
            this._animation.AnimateOn(this);
        }

        public override void OnClick(ClickEventArgs eventArgs)
        {
            //this._animation.Start();
        }

        public override void OnSlide(SlideEventArgs e)
        {
            if(IsSelected)
                this._animation.Start();
        }
    }
}